<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="Format" content="text/html" />
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" />
<meta name="Robots" content="index,follow" />
<meta name="Charset" content="utf-8" />
<meta name="Author" content="master@newstools.kr" />
<meta name="Generator" content="EditPlus Text Editor v3.31" />
<title>멤버십 카드 발급 및 동의</title>
<link rel="stylesheet" href="skin/css/common.css" type="text/css" />
<link rel="stylesheet" href="skin/css/accident6.css" type="text/css" />
<script language="javascript" type="text/javascript" src="skin/js/jquery-1.7.1.min.js" ></script>
<script language="javascript" type="text/javascript" src="skin/js/common_interface.js" ></script>
</head>
<body>
	<script type="text/javascript">
	//<![CDATA[
		function readWebData() {
			//주소
			var form = document.getElementById('contForm');
			var rtn = 1;
			var validation = false;

			if( $('#sel_none').val()=='checked' ) {
				rtn = 0;
				validation = true;
			}
			else if( $('#agree_pluscard').val()!=='checked' ) {
				validation = false;
				alert('PLUS CARD 발급에 대해 동의해 주시거나 미동의를 선택하여 주십시오');
			}
			else if( $('#agree_okcashbag').val()!=='checked' ) {
				validation = false;
				alert('개인정보 제3자 제공동의(OKCashbag 카드 서비스)에 대해 동의해 주시거나 미동의를 선택하여 주십시오');
			}
			else if( $('#agree_enclean').val()!=='checked' ) {
				validation = false;
				alert('개인정보 제3자 제공 동의(Enclean Bonus Card 서비스)에 대해 동의해 주시거나 미동의를 선택하여 주십시오');
			}
			else {
				rtn = 1;
				validation = true;
			}

			if( !validation )
				rtn = '';

			return rtn;
		}

		function WmWriteMsg(arg) {
			//구현불가
			var arryData = new Array();
			arryData = SplitData(arg);

			var form = document.getElementById('contForm');
		}


		/*
		(function ($) {
			$(document).ready(function () {
				$('#sel_all').bind({
					change: function () {
						if( $(this).attr('checked')===undefined )
							$('input[name=agree_check]').attr('checked',null);
						else
						{
							$('input[name=agree_check]').attr('checked','checked');
							$('#sel_none').attr('checked',null);
						}
					}
				});

				$('#sel_none').bind({
					change: function () {
						if( $(this).attr('checked')===undefined )
						{
							//$('#sel_all').attr('checked','checked');
						}
						else
						{
							$('#sel_all').attr('checked',null);
						}
						$('#sel_all').change();
					}
				});

				$('input[name=agree_check]').each(function () {
					$(this).bind({
						change: function () {
							if( $(this).attr('checked')===undefined )
							{
								$('#sel_all').attr('checked',null);
							}
							else
							{
								$('#sel_none').attr('checked',null);
							}
						}
					});
				});
			});
		})(jQuery);
		*/

		function checkAgreeAll(img, checkid)
		{
			var checkbox = clickCheckbox(checkid);

			switch (checkid)
			{
				case 'sel_all':
					if ( checkbox.value=='checked' )	//전체동의선택
					{
						//alert('전체동의');
						changeCheckbox('sel_none', false);

						changeCheckbox('agree_pluscard', true);
						changeCheckbox('agree_okcashbag', true);
						changeCheckbox('agree_enclean', true);
					}
					else
					{
						//alert('전체동의해제');

						changeCheckbox('agree_pluscard', false);
						changeCheckbox('agree_okcashbag', false);
						changeCheckbox('agree_enclean', false);
					}
					break;

				case 'sel_none':
					if ( checkbox.value=='checked' )	//미동의선택
					{
						//alert('미동의');
						changeCheckbox('sel_all', false);

						changeCheckbox('agree_pluscard', false);
						changeCheckbox('agree_okcashbag', false);
						changeCheckbox('agree_enclean', false);
					}
					else
					{
						//alert('미동의해제');
					}
					break;

				default:
					if ( checkbox.value=='checked' )	//개별동의선택
					{
						//alert('개별동의');
						changeCheckbox('sel_none', false);
					}
					else
					{
						//alert('개별동의해제');
						changeCheckbox('sel_all', false);
					}
					break;
			}
		}

		function clickCheckbox(checkid)
		{
			var checkbox = document.getElementById(checkid);
			changeCheckbox(checkid, (checkbox.value!='checked'));

			return checkbox;
		}

		function changeCheckbox(checkid, flag)
		{
			var checkbox = document.getElementById(checkid);
			checkbox.value	= (flag ? 'checked' : '');

			var image = document.getElementById(checkid+'_img');
			image.src		= (flag ? 'skin/images/checkbox_on.png' : 'skin/images/checkbox_off.png');
		}
	//]]>
	</script>
	<div id="wrapper">
		<form id="contForm">
		<!-- STR : content -->
		<div id="content">
			<table border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td id="content_top_left"></td>
					<td id="content_top_center"></td>
					<td id="content_top_right"></td>
				</tr>
				<tr>
					<td id="content_middle_left"></td>
					<!-- STR : 콘텐트 노출 박스 중앙 출력부 -->
					<td id="content_display">
						<!-- 타이틀 출력부 -->
						<h1><img src="skin/images/title_accident_6.jpg" title="멤버십 카드 발급" /></h1>

						<h2 class="tit_state"></h2>

						<!-- STR : 단체선택상자 -->
						<div class="inputbox">
							<div class="sel_lay">
								<img src="skin/images/icon_card.jpg" />

								<div class="chgroup" style="width:35%; margin-right:30%;">
									<img src="skin/images/checkbox_off.png" id="sel_all_img" onclick="checkAgreeAll(this,'sel_all');" />
									<input type="hidden" id="sel_all" name="sel_all" value="" />
									<div class="title">전체동의</div>
								</div>

								<div class="chgroup" style="width:28%; margin-right:0;">
									<img src="skin/images/checkbox_off.png" id="sel_none_img" onclick="checkAgreeAll(this,'sel_none');" />
									<input type="hidden" id="sel_none" name="sel_none" value="" />
									<div class="title">미동의</div>
								</div>
							</div>
						</div>
						<!-- END : 단체선택상자 -->

						<h2 class="tit_city"></h2>

						<!-- STR : PLUS CARD 발급 동의 -->
						<div class="inputbox2">
							<div class="sel_lay">
								<img src="skin/images/checkbox_off.png" id="agree_pluscard_img" onclick="checkAgreeAll(this,'agree_pluscard');" />
								<input type="hidden" id="agree_pluscard" name="agree_check" value="" />
								<div class="title">PLUS CARD 발급 동의</div>
							</div>
							<div class="agree_context" id="scroller1">
								<img src="skin/images/contents_01.png" />
							</div>
						</div>
						<!-- END : PLUS CARD 발급 동의 -->

						<!-- STR : 개인정보 제3자 제공동의 -->
						<div class="inputbox2">
							<div class="sel_lay">
								<img src="skin/images/checkbox_off.png" id="agree_okcashbag_img" onclick="checkAgreeAll(this,'agree_okcashbag');" />
								<input type="hidden" id="agree_okcashbag" name="agree_check" value="" />
								<div class="title">개인정보 제3자 제공동의<br />(OKCashbag 카드 서비스)</div>
							</div>
							<div class="agree_context" id="scroller2">
								<img src="skin/images/contents_02.png" />
							</div>
						</div>
						<!-- END : 개인정보 제3자 제공동의 -->


						<!-- STR : 개인정보 제3자 제공 동의 -->
						<div class="inputbox2">
							<div class="sel_lay">
								<img src="skin/images/checkbox_off.png" id="agree_enclean_img" onclick="checkAgreeAll(this,'agree_enclean');" />
								<input type="hidden" id="agree_enclean" name="agree_check" value="" />
								<div class="title">개인정보 제3자 제공동의<br />(Enclean Bonus Card 서비스)</div>
							</div>
							<div class="agree_context" id="scroller3">
								<img src="skin/images/contents_03.png" />
							</div>
						</div>
						<!-- END : 개인정보 제3자 제공 동의 -->
					</td>
					<!-- END : 콘텐트 노출 박스 중앙 출력부 -->
					<td id="content_middle_right"></td>
				</tr>
				<tr>
					<td id="content_bottom_left"></td>
					<td id="content_bottom_center"></td>
					<td id="content_bottom_right"></td>
				</tr>
			</table>
		</div>
		<!-- END : content -->
		</form>
		<script src="skin/js/iscroll.js"></script>
		<script>
			new iScroll('scroller1', { hScrollbar: false, vScrollbar: false, hScroll: false });
			new iScroll('scroller2', { hScrollbar: false, vScrollbar: false, hScroll: false });
			new iScroll('scroller3', { hScrollbar: false, vScrollbar: false, hScroll: false });
		</script>
	</div>
</body>
</html>